var pageii = null;

function passProject(projectId) {
    layer.confirm('确定通过?', function (index) {
        layer.close(index);
        $.ajax({
            url: '/projectManage/auditingProject?status=3&projectId=' + projectId,
            dataType: "text",
            type: 'post',
            success: function (data) {
                if (data == 'success') {
                    layer.msg('操作成功');
                    location.replace(location)
                    // location.href = '/taskManage/checkItem?taskType=' + $("#taskType").val() + '&taskId=' + $("#taskId").val();
                }
            },
            error: function (data) {
                layer.msg('操作失败');
            }
        });
    });
}

function delProject(projectId) {
    layer.confirm('确定删除该项目?', function (index) {
        layer.close(index);
        $.ajax({
            url: '/projectManage/delProject?projectId=' + projectId,
            dataType: "text",
            type: 'post',
            success: function (data) {
                if (data == 'success') {
                    layer.msg('操作成功');
                    location.replace(location)
                    // location.href = '/taskManage/checkItem?taskType=' + $("#taskType").val() + '&taskId=' + $("#taskId").val();
                }
            },
            error: function (data) {
                layer.msg('操作失败');
            }
        });
    });
}

function projectDetails(projectId) {
    top.pageii  = top.layer.open({
        title: "详情",
        type: 2,
        fixed: true,
        //shadeClose : true,
        area: ["800px", "80%"],
        content: "/projectManage/projectDetailsUI?projectId=" + projectId
    });
}